﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frediumplugins.aspx.cs" Inherits="Cms.Web.UI.Admin.tiny_mce.plugins.frediumplugins.frediumplugins" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <base id="baseTag" runat="server" />
    <link rel="Stylesheet" href="Admin/Css/List.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="Admin/Css/Buttons.css" />
    <script type="text/javascript" src="Admin/tiny_mce/tiny_mce_popup.js"></script>
    <script type="text/javascript" src="Admin/tiny_mce/utils/form_utils.js"></script>
	<script type="text/javascript" src="Admin/tiny_mce/plugins/frediumplugins/js/frediumplugins.js"></script>
    <script language="javascript" src="Admin/Js/CmsLib.js"></script>
    <script language="javascript" src="Admin/Js/Ajax.js"></script>
    <script language="javascript" src="Admin/Js/Lists.js"></script>
	<script type="text/javascript">
	    function resizeMe() {
	        var dx = 0;
	        var dy = document.getElementById("content").offsetHeight - 300 + 60;
            var winID = tinyMCEPopup.id;
            var wm = tinyMCEPopup.editor.windowManager;
            wm.resizeBy(dx, dy, winID);
        }

        function triggerUpdate() {
            document.getElementById("btnUpdate").click();
        }
    </script>
    <style type="text/css">
        img { margin: 0px; border: 0px; }
        a, a:hover { color: #000000; }
        .code { font-family: Courier New; font-size: 11px; }
    </style>
</head>
<body><!-- onload="window.setTimeout('resizeMe();', 0);" -->
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true">
        <Services>
            <asp:ServiceReference Path="~/Authentication.asmx" InlineScript="false" /> 
        </Services>
    </asp:ScriptManager>
    <div id="content" style="margin-bottom: 20px;">
        <div id="pluginPane" style="position: relative;">
            <asp:UpdatePanel ID="upnlPlugins" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
                <ContentTemplate>
                    <input id="hidPropertyList" runat="server" type="hidden" />
                    <input id="hidClassName" runat="server" type="hidden" />
                    <input id="hidAssemblyName" runat="server" type="hidden" />
                    <input id="hidTemplatablePlugin" runat="server" type="hidden" />
                    <div style="height: 430px;">
                        <table class="editForm">
                            <tr>
                                <td><cms:LocalizedLiteral ID="llSelectPlugin" runat="server" />:</td>
                                <td><asp:DropDownList ID="ddlPlugins" runat="server" /></td>
                                <td id="tdSelectTemplate" runat="server">&nbsp;&nbsp;&nbsp;<cms:LocalizedLiteral ID="llSelectTemplate" runat="server" />:</td>
                                <td>
                                    <asp:DropDownList ID="ddlTemplates" runat="server" />
                                    <asp:Panel ID="pnlNoTemplates" runat="server" Visible="false" style="display: inline;">&nbsp;&nbsp;&nbsp;<cms:LocalizedLiteral ID="llNoTemplates" runat="server" /></asp:Panel>
                                </td>
                            </tr>
                        </table>
                        <asp:Button ID="btnUpdate" runat="server" OnClick="btnUpdate_Click" Text="Update" style="position: absolute; left: -10000px;" />
                        <hr />
                        <asp:Panel ID="pnlPlugin" runat="server" Visible="false">
                            <asp:Literal ID="litDescription" runat="server" />
                            <hr />
                            <div style="height: 376px; overflow: auto;">
                                <table class="editForm">
                                    <asp:Repeater ID="rpProperties" runat="server" OnItemDataBound="rpProperties_ItemDataBound">
                                        <ItemTemplate>
                                            <tr valign="top">
                                                <td style="padding-top: 4px;"><asp:Literal ID="litName" runat="server" />:</td>
                                                <td>
                                                    <table border="0" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td style="padding-right: 0px;">
                                                                <asp:TextBox ID="txtValue" runat="server" Width="200" Visible="false" />
                                                                <ilib:iDropDownList ID="ddlValues" runat="server" Visible="false" />
                                                                <asp:CheckBox ID="chkValue" runat="server" Visible="false" />
                                                            </td>
                                                            <td><asp:Literal id="litBrowse" runat="server" /></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </table>
                            </div>
                        </asp:Panel>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <div id="pluginPaneOverlay" class="paneOverlay"></div>
            <div id="pluginPaneOverlayProgress" class="paneOverlayProgress"><img src="Admin/img/progress.gif" /></div>
        </div>
    </div>
    <hr />
	<div class="mceActionPanel" style="bottom: 10px;">
        <asp:UpdatePanel ID="upnlButtons" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
            <ContentTemplate>
		        <a href="#" style="margin-left: -2px; float: left;" onclick="FrediumPluginsDialog.insert(); return false;" class="whiteButton"><span><span><img src="Admin/Img/tp.gif" style="width: 1px; border: 0px;" /><span style="font-weight: bold; width: 70px; text-align: center; display: inline-block;"><cms:LocalizedLiteral ID="llInsert" runat="server" /><cms:LocalizedLiteral ID="llUpdate" runat="server" /></span></span></span></a>
		        <a href="#" style="margin-right: -2px; float: right;" onclick="tinyMCEPopup.close(); return false;" class="whiteButton"><span><span><img src="Admin/Img/tp.gif" style="width: 1px; border: 0px;" /><span style="font-weight: bold; width: 70px; text-align: center; display: inline-block;"><cms:LocalizedLiteral ID="llCancel" runat="server" /></span></span></span></a>
            </ContentTemplate>
        </asp:UpdatePanel>
	</div>
    <script language="javascript">
        //<![CDATA[
        cms.Ajax.Init();
        cms.Ajax.AddEndRequestHandler(cms.Lists.HidePaneOverlays);
        //]]>
    </script>
    </form>
</body>
</html>
